package com.oa.entity;

/**
 * 回复
 */
public class Reply extends Article {

	// 重写 hashCode 
	public int hashCode() {
		return getPostingId().hashCode();
	}
	@Override
	public boolean equals(Object obj) {
		if(obj==null)
			return false;
		else if(obj instanceof Reply){
			Reply other = (Reply) obj;
			if(other.getPostingId().equals(this.getPostingId()))
				return true;
		}
		return false;
	}
	
	// 回复-->主题 1:1
	private Topic topic; // 所属的主题

	public Topic getTopic() {
		return topic;
	}

	public void setTopic(Topic topic) {
		this.topic = topic;
	}

}
